//package com.hexing.forecast.LSTM;
//
//import org.deeplearning4j.nn.modelimport.keras.KerasModelImport;
//import org.deeplearning4j.nn.multilayer.MultiLayerNetwork;
//import org.deeplearning4j.zoo.model.LSTM;
//import org.nd4j.linalg.api.ndarray.INDArray;
//import org.nd4j.linalg.dataset.api.preprocessor.TimeSeriesPreprocessing;
//
//public class LSTMShortTermLoadForecasting {
//    public static void main(String[] args) throws Exception {
//        // 加载数据集
//        INDArray data = TimeSeriesPreprocessing.constantMean(new double[]{1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0});
//        INDArray reshapedData = data.reshape(1, 1, 10); // (batch size, time steps, features)
//
//        // 定义LSTM模型
//        LSTM lstm = new LSTM(numHiddenUnits, outputShape); // 根据您的数据和需求自定义numHiddenUnits和outputShape
//        MultiLayerNetwork model = KerasModelImport.importKerasSequentialModelAndWeights(lstm);
//        model.setInputShape(reshapedData.shape());
//        model.setOutputShape(new int[]{1, outputShape});
//
//        // 使用模型进行预测，输入数据为前面10个时间步的数据，预测下一个时间步的负荷
//        INDArray inputData = reshapedData.get(new int[]{0, 0, 0}, new int[]{1, timeSeriesLength-1, 1});
//        INDArray predicted = model.output(inputData);
//        System.out.println("Predicted load: " + predicted);
//    }
//}